package win.demonlegion.controller;

import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import win.demonlegion.eshimin.service.EshiminService;

@Slf4j
@Controller
@RequestMapping("demo")
public class MainController {
    @Autowired
    private EshiminService eshiminService;

    @RequestMapping("eshimin")
    public String eshimin(String platform, String access_token){
        log.info("platform: {}, access_token: {}", platform, access_token);
        log.info(JSON.toJSONString(eshiminService.userInfoThird(access_token)));
        return "eshimin_demo";
    }
}
